//
//  ResumeViewController.h
//  BombAbility
//
//  Created by oscar chinellato on 28/02/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>

#define kUpdateInterval (0.5f)

@interface GameViewController : UIViewController <UIAccelerometerDelegate, CLLocationManagerDelegate> {
	
	CLLocationManager *locationManager;
	
	IBOutlet UILabel *CurrentXLabel;
	IBOutlet UILabel *CurrentYLabel;
	IBOutlet UILabel *CurrentZLabel;
	
	IBOutlet UILabel *SavedXLabel;
	IBOutlet UILabel *SavedYLabel;
	IBOutlet UILabel *SavedZLabel;
	
	IBOutlet UILabel *CorrectedXLabel;
	IBOutlet UILabel *CorrectedYLabel;
	IBOutlet UILabel *CorrectedZLabel;
	
	IBOutlet UILabel *CompassXLabel;
	IBOutlet UILabel *CompassYLabel;
	IBOutlet UILabel *CompassZLabel;

	UIAccelerationValue accelerationX;
    UIAccelerationValue accelerationY;
	UIAccelerationValue accelerationZ;
	
	float currentRawReadingX;
	float currentRawReadingY;
	float currentRawReadingZ;
	
	float startPosX;
	float startPosY;
	float startPosZ;
	
	float firstCalibrationReading;
    float currentRawReading;
    float calibrationOffset;
	
}

-(void)CorrectValueX:(float)xValue CorrectValueY:(float)yValue CorrectValueZ:(float)zValue;

-(float)roundToWithValue:(float)value DigitsAfterPoint:(int)dap;

-(IBAction) resetAccelerometer;

@property (nonatomic, retain) CLLocationManager *locationManager;

@property (nonatomic, readonly) UIAccelerationValue x;
@property (nonatomic, readonly) UIAccelerationValue y;
@property (nonatomic, readonly) UIAccelerationValue z;

@property (nonatomic , retain) IBOutlet UILabel *CurrentXLabel;
@property (nonatomic , retain) IBOutlet UILabel *CurrentYLabel;
@property (nonatomic , retain) IBOutlet UILabel *CurrentZLabel;

@property (nonatomic , retain) IBOutlet UILabel *SavedXLabel;
@property (nonatomic , retain) IBOutlet UILabel *SavedYLabel;
@property (nonatomic , retain) IBOutlet UILabel *SavedZLabel;

@property (nonatomic , retain) IBOutlet UILabel *CompassXLabel;
@property (nonatomic , retain) IBOutlet UILabel *CompassYLabel;
@property (nonatomic , retain) IBOutlet UILabel *CompassZLabel;

@property float calibrationOffset;


@end
